package com.htjc.integral.conversion.mapper;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Mapper;

@Mapper
public interface EcBpExchangeMapper {
	/**
	 * 查询合作平台积分兑换比例
	 * @param map
	 * @return
	 */
	List<Map<String, Object>> queryCorExchange(Map<String,Object> map);
	
	/**
	 * 更新年度总积分
	 * @param map
	 * @return
	 */
	int updateBpMember(Map<String,Object> map);
	
	/**
	 * 插入积分流水
	 * @param map
	 * @return
	 */
	int insertBpMemberflow(Map<String,Object> map);
	
	/**
	 * 插入积分流水明细
	 * @param map
	 * @return
	 */
	int insertBpMemberflowDetail(Map<String,Object> map);
	
	/**
	 * 插入合作平台积分对账
	 * @param map
	 * @return
	 */
	int insertBpMemberflowRecon(Map<String,Object> map);
	
	/**
	 * 查询明细表，进行对账
	 * @param map
	 * @return
	 */
	Map<String,Object> queryCorExchangeAcc(Map<String,Object> map);
	
	/**
	 * 查询绑定表数据
	 * @param applicationUserCode
	 * @return
	 */
	Map<String,Object> selectBound(Map<String,Object> map);
	Map<String,Object> selectBoundData(Map<String,Object> map);
	
	/**
	 * 查询绑定表数据
	 * @param id
	 * @return
	 */
	Map<String,Object> selectBoundById(String id);
	
	/**
	 * 查询网省
	 * @param Map<String,Object> map
	 * @return
	 */
	Map<String,Object> selectProvince(Map<String,Object> map);
	/**
	 * 更新流水表
	 * @param applicationUserCode
	 * @return
	 */
	int updateBpMemberflow(Map<String,Object> map);
	int updateBpMemberDetailByaccisno(Map<String,Object> map);
	/**
	 * 更新网省与合作平台关联表
	 * @param Map<String,Object> map
	 * @return
	 */
	int updateBpProvince(Map<String,Object> map);
	
	/**
	 * 查询流水表以及绑定表
	 * @param map
	 * @return
	 */
//	List<Map<String,Object>> queryBpMfAndBound(Map<String,Object> map);
	List<Map<String,Object>> queryBpMemdeAndBound(Map<String,Object> map);
	/**
	 * 查询记录数
	 * @param map
	 * @return
	 */
	int queryBpMfAndBoundCount(Map<String,Object> map);
	
	/**
	 * 查询记录数count
	 * @param map
	 * @return
	 */
//	int queryBpMfAndBoundCountForPro(Map<String,Object> map);
	int queryBpMemdeAndBoundCountForPro(Map<String,Object> map);
//	List<Map<String,Object>> queryBpMfForOrg(Map<String,Object> map);
	List<Map<String,Object>> queryBpMemdeForOrg(Map<String,Object> map);
	Map<String,Object> queryBpMemdeTotalByprovinceNo(Map<String,Object> map);
	/**
	 * 积分转换日志记录
	 * @param map
	 * @return
	 */
	int insertBpMemberflowRecord(Map<String,Object> map);

	int updateBpProvinceFH(Map<String, Object> map);
	
	
	Map<String,Object> selectProvinceName(Map<String,Object> map);

	List<Map<String, Object>> getAllPowerUserNO();

	Integer getTotalBoundsPoints(Map<String,Object> map);
}
